package com.hb.trans.mvp.ui.adapter

import com.chad.library.adapter.base.BaseQuickAdapter
import com.chad.library.adapter.base.BaseViewHolder
import com.ctcnit.templatepro.global.MyGlideModule
import com.hb.trans.R
import com.hb.trans.bean.New

class NewListAdapter(layoutResId: Int) : BaseQuickAdapter<New, BaseViewHolder>(layoutResId) {
    override fun convert(helper: BaseViewHolder, item: New) {
        helper.apply {
            setText(R.id.tvNewTitle, item.title)
            setText(R.id.tvNewTime, item.create_time)
            MyGlideModule.load(
                mContext,
                item.head_pic,
                getView(R.id.ivNewPic),
                R.mipmap.ic_new_placeholder,
                R.mipmap.ic_new_placeholder
            )
        }
    }
}